package com.kun.kunkunmall.member.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.kun.common.utils.PageUtils;
import com.kun.kunkunmall.member.entity.MemberEntity;
import com.kun.kunkunmall.member.exception.EmailExistException;
import com.kun.kunkunmall.member.exception.PhoneExistException;
import com.kun.kunkunmall.member.exception.UserNameExistException;
import com.kun.kunkunmall.member.vo.GiteeUserVo;
import com.kun.kunkunmall.member.vo.MemberLoginVo;
import com.kun.kunkunmall.member.vo.MemberRegisterVo;

import java.util.Map;

/**
 * 会员
 *
 * @author wsk
 * @email wsk@gmail.com
 * @date 2023-04-22 14:46:46
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void register(MemberRegisterVo registerVo);

    void checkEmailUnique(String email) throws EmailExistException;

    void checkUserNameUnique(String userName) throws UserNameExistException;

    void checkPhoneUnique(String phone) throws PhoneExistException;

    MemberEntity login(MemberLoginVo loginVo);

    MemberEntity oauth2Login(GiteeUserVo giteeUserVo);
}

